import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Recommond = () => import('@/views/recommond/Recommond')
const HotMusic = () => import('@/views/hotmusic/HotMusic')
const Search = () => import('@/views/search/Search')

const routes = [
  {
    path: '/',
    redirect: '/recommond'
  },
  {
    path: '/recommond',
    component: Recommond
  },
  {
    path: '/hotmusic',
    component: HotMusic
  },
  {
    path: '/search',
    component: Search
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
